const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  transpileDependencies: true,

  devServer: {
    host: "127.0.0.1",
    port: "8080",
    open: true,
    proxy: {
      "/api1": {
        target: "http://gmall-h5-api.atguigu.cn/",
        pathRewrite: {
          "^/api1": "",
        },
        changeOrigin: true,
      },
      "/api2": {
        target: "http://gmall-h5-api.atguigu.cn/",
      },
    },
  },

  lintOnSave: true,

  configureWebpack: {
    resolve: {
      //别名配置
      alias: {
        "@comp": "@/components",
      },
    },
  },
});
